<include file="Public:head" title='替换字符串' />

<div class="main-container" id="main-container">
    <div class="main-container-inner">
        <include file="Public:left" />
        <div class="main-content">
            <div class="breadcrumbs" id="breadcrumbs">
                <ul class="breadcrumb">
                    <li><i class="icon-home home-icon"></i><a href="__APP__/{$Think.MODULE_NAME}">首页</a></li>
                    <li><a href="{:U('Website/lists')}">参考网站管理</a></li>
                    <li class="active">替换字符串{$Think.get.id|getPageType}</li>
                </ul>
            </div>
            <div class="page-content">
                <div class="row">
                    <div class="col-xs-12">
                        <div class="row">
                            <div class="col-xs-12">
                                <h3 class="header smaller lighter blue">参考网站{$Think.get.id|getPageType}</h3>

                                <form action="{:U('Website/exchange_post')}" method="POST" id="form">
                                    <p><a onclick="addFriends()">+添加多个</a></p>
                                    <ul id="jsons">
                                        <foreach name="jsons" item="row">
                                            <li class="li_jsons">
                                                旧的：<input class="common_txt old" type="text" value="{$row.old}" name="old[]"  autocomplete="off"/>
                                                新的：<input class="common_txt new" type="text" value="{$row.new}" name="new[]" autocomplete="off"/>
                                                <a onclick="$(this).parent().remove()">删除</a>

                                            </li>
                                        </foreach>
                                    </ul>
                                    <table class="table table_detail" >
                                        <tr >
                                            <td class="td_left"></td>
                                            <td>
                                                <input type='hidden' name='id' value='{$Think.get.id}'/>
                                                <button class="btn btn-info btn-sm" type="submit">
                                                    <i class="icon-ok bigger-110 "></i>
                                                    保 存
                                                </button>

                                                <button class="btn btn-sm reset" type="button" onclick="goUrl(-1)">
                                                    <i class="icon-undo bigger-110"></i>
                                                    返 回
                                                </button>
                                            </td>
                                        </tr>
                                    </table>
                                </form>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <include file="Public:setting" />
    </div>
</div>
<script>
    function addFriends() {
        var li = "<li class='li_jsons'>旧的：<input name='old[]' type='text' class='common_txt old'  value='' />\n\
标识：<input name='new[]' type='text' class='common_txt new'  value=''/>\n\
<a onclick=$(this).parent().remove()>删除</a></li>";
        $('#jsons').append(li);
    }
  
    function html_format() {
        var page_html = "website/phplo/index.html";
        $.post("{:U('Website/html_format')}", {
            page_html: page_html
        }, function(data) {
        })
    }
</script>

<include file="Public:foot" />